package com.mj.entity;

import lombok.Data;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;

@Data
@Repository
public class User {
    private String name;

    public void close() {
        System.out.println("销毁方法");
    }

    public User() {
        System.out.println("无参的构造方法");
    }

    public void init() {
        System.out.println("初始化方法");
    }

    public User(String name) {
        this.name = name;
        System.out.println("有参的构造方法");
    }
    public void save(){
        System.out.println("数据库保存");
    }
    public void read(){
        System.out.println("数据库读取");
    }
    public void ai(){
        System.out.println("试一试不是s开头的方法");
    }
}
